﻿using System.Text;
using Resources.Scripts.Socket.MyChat.Client;
using Resources.Scripts.Socket.MyChat.Manager;

namespace Resources.Scripts.Utils
{
    public class MessageFormatPack
    {
        private static StringBuilder sendMsg;


        public static string GetSerialize(string message)
        {
            sendMsg = new StringBuilder();
            sendMsg.Append(((int)ChatManager.Instance.SendChannel).ToString("D8"));
            sendMsg.Append("{");
            sendMsg.Append(NetClient.Instance.userId);
            sendMsg.Append(",");
            sendMsg.Append(NetClient.Instance.userName);
            sendMsg.Append("}");
            sendMsg.Append(message);
            return sendMsg.ToString();
        }
        
    }
}